
KC8 Switch API
==============


Functions:
==========

getSwitch()
-----------
Returns the status of the switch (true or false)


setSwitch( status )
-------------------
Status

true (switched on) or false (switched off)



setLabel( text, textFormat, html )
----------------------------------
Text

Label text

TextFormat

textFormat object specifying font properties and alignment.

example:

myTF = new TextFormat();
myTF.font = 'Arial';
myTF.size = 12;
myTF.align = 'left';
mySwitch.setLabel('Caption',myTF);

Html

When set to true, you can use html code inside the label text.



Properties:
===========

embedFonts
----------
Analog to textfield.embedFonts


Events:
=======

onSwitch()
----------
Event called when switch is switched.
